// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * Requisition
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "requisition", autoResultMap = true)
@Schema(title = "调拨单")
@RoleData2(groupId = 2, funcKey = "Requisition")
public class Requisition implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 调拨单号
   */
  @TableField(value = "`rqt_sn`")
  @Schema(title = "调拨单号")
  private String rqtSn;

  /**
   * 出库仓库
   */
  @TableField(value = "`wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "出库仓库")
  private Long wid;

  /**
   * 入库仓库
   */
  @TableField(value = "`to_wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "入库仓库")
  private Long toWid;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @JoinField(SysUser.class)
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 单据状态 (0 - 待配货; 1 - 待调拨; 2 - 待收货; 3 - 已完成; 4 - 已撤销; 5 - 待审批; )
   */
  @TableField(value = "`status`")
  @Schema(title = "单据状态")
  private String status;

  /**
   * 运费
   */
  @TableField(value = "`freight_fee`")
  @Schema(title = "运费")
  private java.math.BigDecimal freightFee;

  /**
   * 其他运费
   */
  @TableField(value = "`other_fee`")
  @Schema(title = "其他运费")
  private java.math.BigDecimal otherFee;

  /**
   * 费用分配方式 (0 - 不分配; 1 - 按SKU数量; 2 - 按实重; 3 - 按体积; 4 -  自定义; )
   */
  @TableField(value = "`fee_part_type`")
  @Schema(title = "费用分配方式")
  private String feePartType;

  /**
   * 调拨类型 (1 - 简易调拨; 2 - 完整调拨; )
   */
  @TableField(value = "`type`")
  @Schema(title = "调拨类型")
  private String type;

  /**
   * 预计到货时间
   */
  @TableField(value = "`arrival_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "预计到货时间")
  private java.util.Date arrivalTime;

  /**
   * 附件
   */
  @TableField(
    value = "`attachment`",
    typeHandler = SysFileListTypeHandler.class
  )
  @Schema(title = "附件")
  private List<SysFile> attachment;

  /**
   * 备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "备注")
  private String remark;
}
